package cn.base.web.lock;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.time.Duration;


@Component
@Getter
@Setter
@ConfigurationProperties(prefix = "lock")
public class LockProperties {

    /** 获取锁等待时长 默认3秒 **/
    private Duration acquireTimeout=Duration.ofSeconds(3);


    /** 持有锁有效期 默认10秒**/
    private Duration leaseTime=Duration.ofSeconds(10);


}
